/***************************************************************************/
/* NOTE:                                                                   */
/* This document is copyright (c) by Oz Solomonovich.  All non-commercial  */
/* use is allowed, as long as this document not altered in any way, and    */
/* due credit is given.                                                    */
/***************************************************************************/

// DevStudioWnd.cpp : implementation file
//
// This class is used to capture messages sent to DevStudio's main window.
// Currently, the WM_GETTEXT message is captured.  Each time WM_GETTEXT is
// used, WndTabs checks if the title of the DevStudio window was changed.  A
// change in the title indicates that the tabs need to be updated.

//this line was inserted and notified to you
//I remove some function or porpert which this addin do not use
//it cound not be replaced by original file

#include "stdafx.h"
#include "TabBars.h"
#include "DevStudioWnd.h"
#include "TabBarWnd.h"
#include "TabManagerWnd.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDevStudioWnd

//##ModelId=431C34CC0223
CDevStudioWnd::CDevStudioWnd(HWND hWndDevStudio) : 
    CSubclassWnd(hWndDevStudio)
{
    DoSubclass();
}

//##ModelId=431C34CC0234
CDevStudioWnd::~CDevStudioWnd()
{
}


BEGIN_MESSAGE_MAP(CDevStudioWnd, CSubclassWnd)
	//{{AFX_MSG_MAP(CDevStudioWnd)
	//}}AFX_MSG_MAP
    ON_MESSAGE(WM_GETTEXT, OnGetWindowText)
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CDevStudioWnd message handlers

//##ModelId=431C34CC0242
LRESULT CDevStudioWnd::OnGetWindowText(WPARAM wParam, LPARAM lParam)
{
    LRESULT lResult = Default();

    if (m_cTitle.Compare((LPCTSTR)lParam) != 0)
    {
        m_cTitle = (LPCTSTR)lParam;
        if (pGlobalActiveManager)
        {
            pGlobalActiveManager->PostUpdateMessage();
        }
    }

    return lResult; 
}

//##ModelId=431C34CC0232
void CDevStudioWnd::PreSubclassWindow() 
{
  GetWindowText(m_cTitle);     
	CSubclassWnd::PreSubclassWindow();
}
